package com.example.blog.mapper;

import com.example.blog.model.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * ClassName: UserInfoMapper
 * Package: IntelliJ IDEA
 * Description:
 *
 * @Author 谷京京
 * @Create 2024/3/26 9:03
 * @Version 1.0
 */
@Mapper
public interface UserInfoMapper {
    /**
     * 根据用户名查询用户信息
     */
    @Select("select * from user where user_name = #{userName} and delete_flag = 0")
    UserInfo queryByName(String userName);
    /**
     * 根据用户Id查询
     */
    @Select("select * from user where id = #{id} and delete_flag = 0")
    UserInfo queryById(Integer id);
}
